package com.emapp.lccode.bean

import java.io.Serializable

data class OrderKt(
    var total: Int = 0,
    var per_page: Int = 0,
    var current_page: Int = 0,
    var last_page: Int = 0,
    var id: String,
    var image: String,
    var name: String,
    var date: String,
    var work_type: String,
    var start_time: String,
    var end_time: String,
    var create_time: String,
    var department_id: String,
    var admin_id: String,
    var map_station_lnglat: String,
    var username: String,
    var department_name: String,
    var address: String,
    var flow_type: String,
    var check_status: Int,
    var reply_status: Int,
    var check_step_sort: Int,
    var check_admin_ids: String,
    var num_code: String?,
    var content: String?,
    var remark: String?,
    var approve_type: String,
    var fileArray: ArrayList<OrderFileKt> = arrayListOf(),
    var lnglat: ArrayList<UpLatLng> = arrayListOf(),
    var data: ArrayList<OrderKt> = arrayListOf(),
) : Serializable {
    val checkIds: Array<Int>
        get() {
            if (check_admin_ids.isEmpty())
                return arrayOf()
            return check_admin_ids.split(",").map { it.toInt() }.toTypedArray()
        }
    var bomArr: ArrayList<MaterialSelectKt> = arrayListOf()
}
/**
 *  check_status状态 0待审核,1审核中,2审核通过,3审核不通过,4撤销审核(  0该管理员派单，派单后变1，接受者回复提物料后变2)
 * check_step_sort =0 并且check_status=0   登录者id (5) 存在于check_admin_ids里面的（5,9）并且不等于发布人ID  说明当前账户为工单分配人员 可进行分配工单或结束工单
 * reply_status      状态 0未回复,1回复中未完成,2已完成
 *check_step_sort =1 并且check_status=1   登录者id (7) 存在于check_admin_ids里面的（7） 说明当前账户为工单接收人员
 */